package com.qd.common.panda.domain.entity.discount;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 加油折扣设置
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class CarParkGasStationDiscountSetDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "加油站公司名称不能为空", groups = {DefaultGroup.class})
    @Size(max = 20, message = "加油站公司名称长度不能超过{max}位", groups = {DefaultGroup.class})
    private String gasStationCompanyName;
    /**
     * 加油站公司名称
     */
    private String gasStationCompanyNameDisplay;
    /**
     * 折扣
     */
    @NotNull(message = "折扣不能为空", groups = DefaultGroup.class)
    private BigDecimal customerDiscount;
    private String customerDiscountDisplay;
    /**
     * 添加时间
     */
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    private LocalDateTime updateTime;
    /**
     * 操作人
     */
    @Size(max = 50, message = "操作人长度不能超过{max}位", groups = DefaultGroup.class)
    private String operator;
    /**
     * 操作人显示
     */
    private String operatorDisplay;
    /**
     * 机构ID
     */
    @Size(max = 50, message = "机构ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String orgId;
    /**
     * 机构显示
     */
    private String orgIdDisplay;

    @Override
    public void freeData() {
        this.gasStationCompanyName = null;
        this.gasStationCompanyNameDisplay = null;
        this.customerDiscount = null;
        this.customerDiscountDisplay = null;
        this.addTime = null;
        this.updateTime = null;
        this.operator = null;
        this.operatorDisplay = null;
        this.orgId = null;
        this.orgIdDisplay = null;
        super.freeData();
    }
}
